import request from '../../../utils/request'

export function list (query) {
  return request({
    url: '/system/monitor/loginLog/list',
    method: 'get',
    params: query
  })
}
// 删除登录日志
export function delLoginLog (infoId) {
  let infoIds = []
  if (!Array.isArray(infoId)) {
    infoIds.push(infoId)
  } else {
    infoIds = infoId
  }
  return request({
    url: '/system/monitor/loginLog/delLoginLog',
    method: 'delete',
    data: infoIds
  })
}
// 导出登录日志
export function exportLoginLogInfo (query) {
  return request({
    url: '/system/monitor/loginLog/export',
    method: 'get',
    params: query
  })
}
// 清空登录日志
export function clearLoginLogInfo (query) {
  return request({
    url: '/system/monitor/loginLog/clearLoginLog',
    method: 'delete',
    params: query
  })
}
